package com.neu.eurekaprovidebook.Controller;

import com.neu.dto.BookDto;
import com.neu.eurekaprovidebook.Service.BookService;
import com.neu.util.CommonResult;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/book")
public class BookController {
    @Resource
    private BookService bookService;
    @RequestMapping("/add")
    public CommonResult add(@RequestBody BookDto dto){
        return bookService.doAdd(dto);
    }
}
